<%-- 
    Document   : include
    Created on : 13/08/2011, 10:55:26 AM
    Author     : Mamdouh Alharbi 4194298
--%>
<%@ include file="header.jsp" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>

    <div id="content-container">
        <div id="content">
            <!-- Content goes here -->
            <p> User Search Result </p><br/><br/><br/>
            <c:choose>
            <c:when test="${searchResult.isEmpty()}">
                <center><h1><font color="red">No result found</font></h1></center>
            </c:when>
            <c:otherwise>
            <center>
                <table>
                     <tr>
                        <th colspan="3">User Information</th>
                    </tr>
                    <tr class="yellow"> 
                        <td>UserID</td>
                        <td>Name</td>
                    </tr>
                    <c:forEach items="${searchResult}" var="searchResult">
                    <tr> 
                        <td>${searchResult.getID()}</td>
                        <td>${searchResult.getName()}</td>
                    </tr>
                    </c:forEach>
                 </table> 
            </center>
            </c:otherwise>
            </c:choose>
            
        </div>
    </div>		
		
<%@ include file="footer.jsp" %>

<style>
  table {
	font: 11px/24px Verdana, Arial, Helvetica, sans-serif;
	border-collapse: collapse;
	width: 320px;
	}

th {
	padding: 0 0.5em;
	text-align: left;
	}

tr.yellow td {
	border-top: 1px solid #FB7A31;
	border-bottom: 1px solid #FB7A31;
	background: #FFC;
	}

td {
	border-bottom: 1px solid #CCC;
	padding: 0 0.5em;
	}

td:first-child {
	width: 190px;
	}

td+td {
	border-left: 1px solid #CCC;
	text-align: center;
	}
</style>